package com.six.work.controller;

import com.six.work.entity.State;
import com.six.work.services.StateServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController
@RequestMapping("state")
public class StateController {

    @Autowired
    private StateServices stateServices;

    @GetMapping("/list")
    public List<State> getAllState(){
        return stateServices.getState();
    }
}

